package com.lifo.good.dao;

import com.lifo.good.bean.model.HfGoods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by Administrator on 2018/4/20 0020.
 */
@Mapper
public interface SearchGoodsMapper {
    /**
     * 获取分页商品信息
     *
     * @return
     */
    List<HfGoods> searchHfGoodsByPage();

    /**
     * 根据主键查询单个商品信息
     * @param hfUid 主键
     * @return
     */
    HfGoods searchHfGoodsByHfUid(@Param(value = "hfUid") Integer hfUid);


    /**
     * 获取未匹配商品信息
     * @param startIndex
     * @param endIndex
     * @return
     */
    List<HfGoods> searchNoMatchGoodsByPage(@Param(value = "startIndex") int startIndex, @Param(value = "endIndex") int endIndex);

    /**
     * 获取未匹配的商品数量
     * @return
     */
    Integer searchNoMatchGoodsCount();

    /**
     * 修改商品类目id
     * @param hfGoods
     */
    void updateHfGoodsCategoryId(HfGoods hfGoods);

    /**
     * 通过类目i的查找商品
     *
     * @param categoryId
     * @param pageSize
     * @return
     */
    List<HfGoods> searchHfGoodsByCategory( @Param(value = "categoryId") Long categoryId );

    List<HfGoods> searchRandomHfGoods(@Param(value = "shopId") int shopId,@Param(value = "randomRow")  int randomRow);
}
